package org.example.mydeom.service;


import com.baomidou.mybatisplus.extension.service.IService;
import me.zhyd.oauth.model.AuthUser;
import org.example.mydeom.pojo.dto.UserLoginDTO;
import org.example.mydeom.pojo.dto.UserRegisterDTO;
import org.example.mydeom.pojo.entity.User;
import org.example.mydeom.pojo.vo.UserVO;
import org.example.mydeom.result.Result;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.PasswordEncoder;

public interface UserService  extends UserDetailsService, IService<User> {
    Result<UserVO> login(UserLoginDTO userLoginDTO, AuthenticationManager authenticationManager);

    Result<Void> register(UserRegisterDTO userRegisterDTO, PasswordEncoder passwordEncoder);

    Result<UserVO> otherLogin(AuthUser data, PasswordEncoder passwordEncoder, AuthenticationManager authenticationManager);
}
